<?php



/**
 * Skeleton subclass for representing a row from the 'user' table.
 *
 * 
 *
 * You should add additional methods to this class to meet the
 * application requirements.  This class will only be generated as
 * long as it does not already exist in the output directory.
 *
 * @package    propel.generator.
 */
class User extends BaseUser {

	/**
	 * Get the associated Education object
	 *
	 * @param      PropelPDO Optional Connection object.
	 * @return     Education The associated Education object.
	 * @throws     PropelException
	 */
	public function getEducations(PropelPDO $con = null)
	{
		if ($this->aEducations === null && ($this->uid !== null)) {
			$this->aEducations = EducationQuery::create()
				->filterByUser($this) // here
				->findOne($con);
				//fixed the generated code bug.
			if($this->aEducations === null)
			{
				return $this->aEducations;
			}
			else
			{
				$this->aEducations->setUser($this);
			}
			// Because this foreign key represents a one-to-one relationship, we will create a bi-directional association.
			$this->aEducations->setUser($this);
		}
		return $this->aEducations;
	}
} // User
